package cn.etynit.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author etyn
 * @since 2022-12-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_user_family")
public class UserFamily extends Model<UserFamily> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 家庭成姓名
     */
    @TableField("family_name")
    private String familyName;
    /**
     * 家庭成员电话
     */
    @TableField("family_phone")
    private String familyPhone;
    /**
     * 户主id
     */
    @TableField("user_id")
    private Long userId;

    private String account;

    private String password;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFamilyName() {
        return familyName;
    }

    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    public String getFamilyPhone() {
        return familyPhone;
    }

    public void setFamilyPhone(String familyPhone) {
        this.familyPhone = familyPhone;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "UserFamily{" +
        ", id=" + id +
        ", familyName=" + familyName +
        ", familyPhone=" + familyPhone +
        ", userId=" + userId +
        "}";
    }
}
